package com.smkj.kaoqin.modules.student.mapper;

import com.smkj.kaoqin.modules.common.pojo.db.Classes;
import com.smkj.kaoqin.modules.common.pojo.db.User;
import com.smkj.kaoqin.modules.student.pojo.db.Student;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 学生表 Mapper 接口
 * </p>
 *
 * @author yztyear
 * @since 2024-09-11
 */
public interface StudentMapper extends BaseMapper<Student> {

    @Select("select * from user where id = #{id}")
    User queryUser(Long id);

    @Select("select * from classes where id = #{id}")
    Classes queryClassById(Long id);

    @Select("select count(*) from classes where class_name = #{ClassName}")
    Long ClassNumCount(String ClassName);
}
